package com.cqndt.disaster.device.domain;

import lombok.Data;
import java.util.Date;
import java.io.Serializable;
import lombok.EqualsAndHashCode;
import java.text.SimpleDateFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

@Data
@TableName("tab_alarm_info")
@EqualsAndHashCode(callSuper=false)
public class TabAlarmInfo implements Serializable{
	
	private static final long serialVersionUID = -1573122434333625477L;

    @TableId
    private Integer id;
    private Integer monitoringId;
    private Integer alarmType;
    private Double value;
    private Integer level;
    private String sensorNo;
    private Date time;
    public String getTimeStr() {
        if(null == getTime()){
            return null;
        }
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String dateString = formatter.format(getTime());
        return dateString;
    }
}